<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorator="themes/default/layout/public">

<head>
    <title th:text="|通知提醒 - ${GlobalSetting.website.name}|"></title>

</head>
<div  layout:fragment="content">
    <div class="row">
        <!--左侧菜单-->
        <div th:replace="themes/default/layout/profile_menu"></div>

        <div id="main" class="settings col-md-10 form-horizontal">
            <h2 class="h3 post-title">通知提醒</h2>
            <div class="row mt-30">
                <form name="notify_form" method="post" th:action="${#request.getRequestURI()}">
                    <div class="col-md-8">
                        <div class="form-group">
                            <label class="control-label col-sm-2">站内通知</label>
                            <div class="col-sm-8">
                                <div class="checkbox" th:each="type:${notificationTypes}">
                                    <label>
                                        <input name="siteNotifications" type="checkbox" th:value="${type}" th:checked="${#sets.contains(siteNotifications,type)}" />  <th:block th:text="${type.name}"></th:block>
                                    </label>
                                </div>

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-2">邮件通知</label>
                            <div class="col-sm-8">
                                <div class="checkbox" th:each="type:${notificationTypes}" th:if="${type.name =='当有人邀请我回答问题时' || type.name=='当有人采纳我的回答时'}">
                                    <label>
                                        <input  name="emailNotifications" type="checkbox" th:value="${type}"  th:checked="${#sets.contains(emailNotifications,type)}" > <th:block th:text="${type.name}"></th:block>
                                    </label>
                                </div>

                            </div>
                        </div>
                        <div class="form-action row">
                            <label for="" class="control-label col-sm-2"></label>

                            <div class="col-sm-8">
                                <button class="btn btn-xl btn-primary" type="submit">提交</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>